import request from '@/utils/request.js'
const api_name = '/portal/like'

// 咨询点赞/取消赞
export function doConsultLike (data) {
  return request({
    url: `${api_name}/consult`,
    method: 'post',
    data
  })
}

//问答评论点赞/取消赞
export function doCommentLike (data) {
  return request({
    url: `${api_name}/comment`,
    method: 'post',
    data
  })
}

//获取用户评论点赞列表
export function getCommentLikeList (id) {
  return request({
    url: `${api_name}/comment/${id}`,
    method: 'get'
  })
}

//获取用户课程咨询点赞列表
export function getConsultLikeList (id) {
  return request({
    url: `${api_name}/consult/${id}`,
    method: 'get'
  })
}
